Skip to content

Render Codex inline visualizations in chat - #83

Merged
badcuban merged 2 commits into
mainfrom
agent/codex-inline-visualizations
Jul 23, 2026
Merged

Render Codex inline visualizations in chat#83
badcuban merged 2 commits into
mainfrom
agent/codex-inline-visualizations

Conversation

@badcuban

Copy link
Copy Markdown
Collaborator

What changed

  • recognize standalone ::codex-inline-vis{file="..."} directives outside fenced code
  • resolve native Codex visualization fragments through a schema-validated WebSocket RPC
  • securely derive the thread-scoped Codex path, reject symlinks and files over 5 MB, and avoid exposing filesystem paths to clients
  • render interactive fragments in a theme-aware allow-scripts iframe without allow-same-origin
  • add dynamic height, bounded client caching, loading/error states, external-link confirmation, streaming-tail suppression, and copy cleanup

Why

The native Codex Visualize skill emits an HTML fragment plus an inline directive. Threadlines previously passed that directive through ordinary Markdown, so users saw raw text instead of the interactive result.

User impact

Codex visualizations now appear directly at the directive position in chat while preserving surrounding Markdown. Other providers and malformed directives remain unaffected.

Validation

  • vp fmt
  • vp lint
  • vp run typecheck
  • vp run @threadlines/contracts#test orchestration
  • vp run @threadlines/web#test ChatMarkdown
  • vp run @threadlines/web#test MessagesTimeline.logic
  • vp run @threadlines/web#test wsRpcClient
  • vp run @threadlines/server#test CodexHomeLayout
  • vp run @threadlines/server#test ws
  • vp run @threadlines/web#test:browser ChatMarkdown

@vercel

vercel Bot commented Jul 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
threadlines Skipped Skipped Jul 23, 2026 3:19am

Request Review

@github-actions github-actions Bot added size:XL vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Jul 23, 2026
@badcuban
badcuban merged commit cbf0bb1 into main Jul 23, 2026
15 checks passed
@badcuban
badcuban deleted the agent/codex-inline-visualizations branch July 23, 2026 03:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant